<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>项目管理</title>
    <style type="text/css">
    </style>
    <jsp:include page="../../import.jsp" flush="true"/>
    <script type="text/javascript">
        var grid = null;
        $(function () {
            var _paylistcodetmp = parent.pageInApp.paylistcode;
            var parms = {};
            if(typeof(_paylistcodetmp) != "undefined" && _paylistcodetmp != ""){
                $("#paylistCode").val(_paylistcodetmp);
                parms.paylistCode = _paylistcodetmp;
                parent.pageInApp.paylistcode="";
            }
            $("#ligergrid1").ligerGrid({
                url: '<%=path%>/infside/infWarrantProduct/initInfWarrantProductList.do',
                parms: parms,
                method : 'get',
                columns: [
                    { display: '设备名称', name: 'name', minWidth: 100, align: 'center', enabledSort:true},
                    { display: '设备型号', name: 'model', minWidth: 100, align: 'center', enabledSort:true},
                    { display: '支付表号', name: 'paylistCode', minWidth: 100, align: 'center', enabledSort:true},
                    { display: '是否新设备', name: 'isNewNm', minWidth: 100, align: 'center', enabledSort:true},
                    { display: '设备单价', name: 'pricedou', minWidth: 100, align: 'center', enabledSort:true},
                    { display: '车架号码', name: 'vinNo', minWidth: 100, align: 'center', enabledSort:true},
                    { display: '发动机号码', name: 'engNo', minWidth: 100, align: 'center', enabledSort:true},
                    { display: '发送状态', name: 'statusNm', minWidth: 100, align: 'center', enabledSort:true},
                    { display: '返回信息', name: 'message', minWidth: 300, align: 'center', enabledSort:true}
                ],
                pageSize:10,
                root:'rows',
                record:'total',
                hideLoadButton : true,
                width: '100%',
                height:'100%',
                heightDiff:-2,
                //checkbox:true,
                rownumbers:true
            });
            grid = liger.get("ligergrid1");
            grid.setHeight(100);
            $("#searchBar").ligerForm();
            $("#searchBtn").click(function(event) {
                var form = new liger.get("searchBar");
                var data = form.getData();
                console.log(data);
                for (name in data){
                    grid.setParm(name,data[name]);
                };
                grid.reload();
            });
            $("#clearBtn").click(function(event) {
                clearLigerForm("searchBar");
            });
        });
    </script>
</head>

<body class="iframeBody">
<div class="Wrapper">
    <div class="searchArea">
        <form id="searchBar">
            <div class="fieldset1 clearFix">
                <div class="fieldBox">
                    <div class="label">支付表号</div>
                    <div class="field">
                        <input name="paylistCode" id="paylistCode" type="text" class="ui-textbox" value="">
                    </div>
                </div>
                <div class="fieldBox">
                    <div class="label">设备名称</div>
                    <div class="field">
                        <input name="name" id="name" type="text" class="ui-textbox" value="">
                    </div>
                </div>
                <div class="fieldBox">
                    <div class="label">设备型号</div>
                    <div class="field">
                        <input name="model" id="model" type="text" class="ui-textbox" value="">
                    </div>
                </div>
                <div class="fieldBox">
                    <div class="label">状态</div>
                    <div class="field">
                        <select name="status"  id="status"  disabled="disabled">
                            <option value="  " selected="selected">--请选择--</option>
                            <c:forEach items="${statuslist}" var="opt">
                                <option value="${opt.key}">${opt.value}</option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
                <div class="clearFix"></div>
                <div class="btnsBox">
                    <span id="searchBtn" class="sq-button sq-button-hasicon"><i class="sqBtnIco_1"></i>查询</span>
                    <span id="clearBtn" class="sq-button sq-button-hasicon"><i class="sqBtnIco_19"></i>清空</span>
                    <input id="resetBtn" type="reset" value="重置" class="l-button l-button-reset Hide"/>
                </div>
            </div>
        </form>
    </div>
</div>
<div id="ligergrid1" class="sq-grid"></div>
</body>
</html>
